<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>${setting.siteName} - 编辑订单管理</title>
    <meta name="keywords" content="${setting.siteName}">
    <meta name="description" content="${setting.siteName}">
    <!-- BEGIN HEADER -->
    [#include "/admin/include/style.ftl"]
    <!-- END HEADER -->
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content  animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>编辑订单管理</h5>
                    <div class="ibox-tools">
                        <button type="button" class="btn btn-outline btn-white btn-xs" id="btn-return-loippi"
                                onclick="location.href='${base}/admin/torder/list.jhtml'"><i
                                    class="fa fa-reply-all"></i> 返回列表
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <form id="inputForm" class="form-horizontal" action="${base}/admin/order/update.jhtml"
                          method="post">
                        <input type="hidden" value="${tOrder.id}" name="id"/>
                        <div class="form-group">
                            <div class="row">
                                <div class="col-sm-6">
                                    <label class="col-sm-3 control-label">订单号</label>
                                    <div class="col-sm-9">
                                        <input type="text" name="orderSn" class="form-control" maxlength="200"
                                               value="${(tOrder.orderSn)!''}"/>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <label class="col-sm-3 control-label">用户名称</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" maxlength="200"
                                               value="${(tOrder.user.nickName)!''}"/>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--/row-->

                        <div class="form-group">
                            <div class="row">
                                <div class="col-sm-6">
                                    <label class="col-sm-3 control-label">收货地址</label>
                                    <div class="col-sm-9">
                                        <input type="text" name="addressDetail" class="form-control" maxlength="200"
                                               value="${(tOrder.addressDetail)!''}"/>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--/row-->
                        <div class="form-group">
                            <div class="row">
                                <div class="col-sm-6">
                                    <label class="col-sm-3 control-label">订单总额</label>
                                    <div class="col-sm-9">
                                        <input type="text" name="amount" class="form-control" maxlength="200"
                                               value="${(tOrder.amount)!''}"/>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <label class="col-sm-3 control-label">实付金额</label>
                                    <div class="col-sm-9">
                                        <input type="text" name="realAmount" class="form-control" maxlength="200"
                                               value="${(tOrder.realAmount)!''}"/>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--/row-->

                        <div class="form-group">
                            <div class="row">
                                <div class="col-sm-6">
                                    <label class="col-sm-3 control-label">收货人姓名</label>
                                    <div class="col-sm-9">
                                        <input type="text" name="userName" class="form-control" maxlength="200"
                                               value="${(tOrder.userName)!''}"/>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <label class="col-sm-3 control-label">收货手机号</label>
                                    <div class="col-sm-9">
                                        <input type="text" name="phone" class="form-control" maxlength="200"
                                               value="${(tOrder.phone)!''}"/>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--/row-->
                        <div class="form-group">
                            <div class="row">
                                <div class="col-sm-6">
                                    <label class="col-sm-3 control-label">快递单号</label>
                                    <div class="col-sm-9">
                                        <input type="text" name="logisticsNumber" class="form-control" maxlength="200"
                                               value="${(tOrder.logisticsNumber)!''}"/>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <label class="col-sm-3 control-label">物流公司名称</label>
                                    <div class="col-sm-9">
                                        <select class="form-control" name="logisticsCompany" maxlength="200" required>
                                            <option value="zhongtong" [#if tOrder.logisticsCompany == "zhongtong"]selected[/#if]>中通快递</option>
                                            <option value="shunfeng" [#if tOrder.logisticsCompany == "shunfeng"]selected[/#if]>顺风速运</option>
                                            <option value="yunda" [#if tOrder.logisticsCompany == "yunda"]selected[/#if]>韵达快递</option>
                                            <option value="shentong" [#if tOrder.logisticsCompany == "shentong"]selected[/#if]>申通快递</option>
                                            <option value="yuantong" [#if tOrder.logisticsCompany == "yuantong"]selected[/#if]>圆通速递</option>
                                            <option value="huitongkuaidi" [#if tOrder.logisticsCompany == "huitongkuaidi"]selected[/#if]>百世快递</option>
                                            <option value="debangkuaidi" [#if tOrder.logisticsCompany == "debangkuaidi"]selected[/#if]>德邦快递</option>
                                            <option value="youzhengguonei" [#if tOrder.logisticsCompany == "youzhengguonei"]selected[/#if]>邮政快递包裹</option>
                                            <option value="tiantian" [#if tOrder.logisticsCompany == "tiantian"]selected[/#if]>天天快递</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-sm-12 col-sm-offset-10">
                                <button type="button" class="btn btn-default" onclick="window.history.back();">返回
                                </button>
                                <button class="btn btn-success" type="submit">保存内容</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- BEGIN Script -->
[#include "/admin/include/script.ftl"]
<!-- END Script -->
<script>
    $(document).ready(function () {
        [@flash_message /]
        $(".chosen-select").chosen({width: "100%"});
        $(".input-daterange").datepicker({keyboardNavigation: false, forceParse: false, autoclose: true});

        $(".browserButton").browser({
            callback: function (url) {
                $("#" + $(this).attr('for')).val(url);
            }
        });

        $(".input-group.date").datepicker({
            todayBtn: "linked",
            keyboardNavigation: false,
            forceParse: false,
            calendarWeeks: true,
            autoclose: true
        });
        $("#inputForm").validate({
            rules: {
                logisticsNumber: {
                    required: true
                }
            },
            messages: {}
        });
    });
</script>
</body>
</html>
